import useRequest from '@/utils/request'

const request = useRequest({})
// 查询岗位列表
export function listPost(query: any) {
  return request.get('/system/post/list', {
    params: query,
  })
}

// 查询岗位详细
export function getPost(postId: string) {
  return request.get('/system/post/' + postId)
}

// 新增岗位
export function addPost(data: any) {
  return request.post('/system/post', data)
}

// 修改岗位
export function updatePost(data: any) {
  return request.put('/system/post', data)
}

// 删除岗位
export function delPost(postId: string) {
  return request.delete('/system/post/' + postId)
}
